
#ifndef LEXIC_UNITS_H

#define LEXIC_UNITS_H

#include "lexic_unit.h"
#include "fast_string_table.h"
#include "generic_table.h"

#include <string>
using namespace std;




class LexicUnits
{
public:
	LexicUnits();
	~LexicUnits();
// TODO add, remove, ... functions
	bool AddUnit(LexicUnit lexicUnit, char * str); // za konstante i identifikatore
	bool AddUnit(LexicUnit lexicUnit); // za sve ostale 
	bool RemoveUnit(LexicUnit lexicUnit); // ???
	LexicUnit GetLexicUnit(int id);
	
	
	string GetLexicUnitString(LexicUnit * lu);
	string GetLexicUnitString(int id);
	string GetIdentifierString(int id);
	// TODO get content of lexic unit :)

	
	LexicUnit GetNextUnit();
	LexicUnit LookNextUnit();
	LexicUnit LookNextUnit(int count);
	LexicUnit RewindUnit();
	LexicUnit RewindUnit(int count);

	
	GenericTable<LexicUnit> * uniformCharacters;

private:
	// FastStringTable was removed
	//GenericTable<LexicUnit> * constants;
	//GenericTable<string> * constantsString;
	FastStringTable * constants;

	FastStringTable * identifiers;
	//GenericTable<LexicUnit> * identifiers;
	// GenericTable<string> * identifiersString;
	static const char * GetKeywordStringFromEnum(Keywords id);
	static const char * GetOperatorStringFromEnum(Operators id);
	static const char * GetSpecialCharacterStringFromEnum(SpecialCharacters id);
	static const char * GetSpecialTypeStringFromEnum(SpecialType id);

};




#endif
